/*
 * PWM.h
 *
 * Created: 2012-05-16 09:50:32
 *  Author: Johan
 */ 
#include <avr/io.h>

#ifndef PWM_H_
#define PWM_H_

class PWM {
	private:
		int min;
		int max;
		float period;
		int direction;
	
	public:
	
		enum Channel
		{
			A,
			B,
			C
		};
		PWM();
		void setWidth(Channel c, int us);
		int getWidth(Channel c);
		float getDutycycle(Channel c);
		void setDutycycle(Channel c, float duty_cycle);
		void enableCompareInterrupt(Channel c);
		void disableCompareInterrupt(Channel c);
};




#endif /* PWM_H_ */